package com.nio.handler;

import org.apache.log4j.Logger;

import com.nio.event.ServerEventAdapter;
import com.nio.io.Request;
import com.nio.io.Response;

public class LogHandler extends ServerEventAdapter {

  private Logger log=Logger.getLogger(this.getClass());

  @Override
  public void onAccept() {
    log.debug("log--->accpet");
  }

  @Override
  public void onAccepted(Request req) {
    log.debug("log--->accpeted");
  }

  @Override
  public void onClosed(Request req) {
    log.debug("log--->closed");
  }

  @Override
  public void onError(String msg) {
    log.debug("log--->" + msg);
  }

  @Override
  public void onRead(Request req) {
    log.debug("log--->read");
  }

  @Override
  public void onWrite(Request req, Response resp) {
    log.debug("log--->write");
  }
}
